Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating script to work in 2019 #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JackDanger
Copy link

@JackDanger JackDanger commented Feb 5, 2019

This change pins the Docker image to a modern Alpine and introduces Gemfile.lock for pinning gem versions.

Using a Docker image built on this PR we can recreate the Dockerfile of the image:

$ dockerfile-from-image dockerfile-from-image:latest
FROM alpine:latest
RUN apk --update add gcc libc-dev make ruby ruby-dev ruby-irb ruby-json && gem install --no-rdoc --no-ri bundler -v 1.16.1 && rm /var/cache/apk/*
WORKDIR /usr/src/app
ADD file:8846919c69ba1db0d696b60c308789910d605613efbaabc9a39e922cefda1d9d in /usr/src/app/
ADD file:d4a7c1736d3fdf8b52906ed2f4e9b10cd5632a382fd493af2c6531fd11173a1f in /usr/src/app/
RUN bundle
ADD file:3ee34f17db9fd9bd8d12051a7959f986ae8705ba392c2d4f2bd28e097a896dde in /usr/src/app/dockerfile-from-image.rb

@JackDanger JackDanger changed the title Updating 2016 script to 2019 Updating script to work in 2019 Feb 5, 2019
@JackDanger JackDanger force-pushed the jackdanger/pinning-ruby-and-gem-versions branch from 5e73247 to d4572f4 Compare February 5, 2019 01:04
@sokoow
Copy link

sokoow commented Feb 6, 2019

Woohoo! :D

@mdiasfernandes
Copy link

Thanks @JackDanger, it's fully working 👌

@ozbillwang
Copy link
Contributor

ozbillwang commented Jun 25, 2020

Not really

git clone [email protected]:JackDanger/dockerfile-from-image.git JackDanger/dockerfile-from-image
cd JackDanger/dockerfile-from-image
docker build -t dfimage . 
alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm dfimage"
docker pull devopsqa/fortify

dfimage devopsqa/fortify
/usr/src/app/dockerfile-from-image.rb:33:in `block in <main>': undefined method `first' for nil:NilClass (NoMethodError)
	from /usr/src/app/dockerfile-from-image.rb:32:in `each'
	from /usr/src/app/dockerfile-from-image.rb:32:in `each_with_object'
	from /usr/src/app/dockerfile-from-image.rb:32:in `<main>'

I am looking for a image to run with fortify, and find it in hub.docker.com. I 'd like to reverse its Dockerfile. this image devopsqa/fortify is huge,

docker images devopsqa/fortify
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
devopsqa/fortify    latest              9db34bb78a6e        2 years ago         3.04GB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants